<?php

namespace App\Model\form;

use App\Model\Attachment;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Model;

trait AttachmentTrait
{
    /**
     * 根据id查询附件url
     * @param $where
     * @return Builder|Model|object|null
     */
    public function getAttachmentUrl($where)
    {
        return Attachment::where($where)->value('url');
    }


}